package com.ktjy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysUser implements Serializable {
    @TableId(type=IdType.AUTO)
    private Long id;
    private String account;
    private String realName;
    @JsonIgnore
    private String password;
    private Integer sex;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    private String phone;
    private String address;
    private Long roleId;
    private Long createdUserId;
    private Date createdTime;
    private Long updatedUserId;
    private Date updatedTime;
    private String idPicPath;
    private String workPicPath;

    @TableField(exist = false)
    private SysRole role;
}